Program Example;
 var 
  A : array [30] of byte;          
  B : array [30] of integer;            
  i,j:byte;
  per,i1:integer;
  Buff:byte;
begin 
  clear;
  B[1]:=1;
A[1]:=-5; A[2]:=44;  A[3]:=3;A[4]:=2; A[5]:=1;


for i:=5 downto 2 do
  begin
   for j:=1 to i-1 do
    begin
     if A[j]+B[1]-1 > A[j+1] then
      begin
       buff:=A[j];
       A[j]:=A[j+1];
       A[j+1]:=buff;
      end;
    end;
   end;
 for i:=1 to 5 do 
  begin
   buff:=A[i];
   write(buff,' ');
  end;
 writeln;
 



end.
